import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/admin/trainingStudentRegister/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/admin/trainingStudentRegister/',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/admin/trainingStudentRegister/' + id,
    method: 'get'
  })
}

export function getObjByStudentId(studentId) {
  return request({
    url: '/admin/trainingStudentRegister/getObjByStudentId/' + studentId,
    method: 'get'
  })
}

export function delObj(row) {
  return request({
    url: '/admin/trainingStudentRegister/' + row.fid,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/admin/trainingStudentRegister/',
    method: 'put',
    data: obj
  })
}

export function signUp(obj) {
  return request({
    url: '/admin/trainingStudentRegister/signUp',
    method: 'post',
    data: obj
  })
}
